{% spaceless %}
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>Dmblog - {% block title %}{% endblock %}</title>
        <link rel="shortcut icon" href="/images/favicon.png" />
        {% block head_link %}{% endblock %}
        <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}styles/reset.css" media="all" />
        <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}styles/default.css" media="all" />
        {% block styles %}{% endblock %}
        <script type="text/javascript" src="{{ STATIC_URL }}scripts/jquery.1.7.1.js"></script>
        {% block scripts %}{% endblock %}
    </head>
    <body>     
        <div id="container">
            <header id="header">
                <h1><a href="{% url mblog_index %}"><img src="/static/images/favicon.png" alt="Dmblog" />Dmblog</a></h1>
                <nav>
                    <ul id="nav">
                        <li><a href="{% url mblog_home %}">首页</a></li>
                        {% if user.is_authenticated %}
                            <li><a href="{% url mblog_user_index user.username %}">{{ user.username }}</a></li>
                            <li><a href="{% url mblog_userslist %}">网友们</a></li>
                            <li><a href="{% url mblog_setting %}">设置</a></li>
                            <li>
                                <a href="{% url mblog_receiverslist user.username %}">
                                    {% if pcount%}
                                    私信 <b id="unreader" style="color:red;">({{ pcount }})</b>        
                                    {% else %}
                                    私信
                                    {% endif %}
                                </a>
                            </li>
                            <li><a href="{% url mblog_favoritelist user.username %}">收藏</a></li>
                            <li><a href="/admin/">管理</a></li>
                            <li><a href="{% url mblog_signout %}">注销</a></li>
                        {% else %}
                            <li><a href="{% url mblog_signin %}">登陆</a></li>
                            <li><a href="{% url mblog_signup %}">注册</a></li>
                        {% endif %}
                    </ul>
                </nav>
            </header>
            {% block doublemain %}{% endblock %}
            {% block sinlgemain %}{% endblock %}
            <footer id="footer">Powered by <a href="http://rsj217.diandian.com">rsj217</a>.</footer>
        </div>
    </body>
</html>
{% endspaceless %}
